package com.yhh.xiaohongshuauth.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.aspectj.apache.bcel.classfile.Code;

import java.util.Objects;

/**
 * @Date 2025-04-30 10:49
 * @ClassName: LoginTypeEnum
 * @Description: TODO
 */
@Getter
@AllArgsConstructor
public enum LoginTypeEnum {
    /**
     * @author Eason
     * @date 2025-04-30 10:50
     * @description: 登录枚举类
    */
    //验证码
    VERIFICATION_CODE(1),
    //密码
    PASSWORD(2);

    private final Integer value;

    public static LoginTypeEnum valueOf(Integer value){
        for (LoginTypeEnum loginTypeEnum : LoginTypeEnum.values()){
            if (Objects.equals(value,loginTypeEnum.getValue())){
                return loginTypeEnum;
            }
        }
        return null;

    }

}
